﻿using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace NinjaToolbox.PhysicsSystem
{
    public abstract class PhysicsObjectShapeBase : MonoBehaviour
    {
        public bool alwaysVisibleGizmos;

        public abstract Vector3 GetWorldPosition();

        public abstract Vector3 MassPointToEdge(Vector3 massPoint, Vector3 outsidePoint);

        public abstract bool IsHit(PhysicsObjectShapeBase shape);

        public abstract bool IsHit(Vector3 compareMassPoint);

        protected abstract void DrawGizmos();

        void OnDrawGizmos()
        {
            if (!alwaysVisibleGizmos) return;

            DrawGizmos();
        }

        void OnDrawGizmosSelected()
        {
            if (alwaysVisibleGizmos) return;

            DrawGizmos();
        }
    }
}
